/*
 * Base structure
 */
@sidebar-width: 170px;
@sidebar-width-collapse: 56px;
@nav-height: 50px;
@min-width: 1024px;
/* Move down content because we have a fixed navbar that is 50px tall */
body {
  padding-top: @nav-height;
  min-width: @min-width;
  padding-left: @sidebar-width;
  font-family: "微软雅黑", "黑体", "Helvetica Neue", Helvetica, Arial, sans-serif;
  &.nav-collapse {
    padding-left: @sidebar-width-collapse;
  }
}

/*
 * Top navigation
 * Hide default border to remove 1px line.
 */
.navbar {
  border: 0;
  height: @nav-height;
  background-color: #0099cc;

  .navbar-toggle {
    background-color: #0087b4;
    .icon-bar {
      background-color: white;
    }
  }
  .navbar-collapse {
    background-color: #0099cc;
  }
  .navbar-brand {
    &.logo {
      background-color: #0087b4;
      width: @sidebar-width-collapse;
      padding: (@nav-height - 30px) / 2 (@sidebar-width-collapse - 30px) / 2;
      img {
        width: 30px;
        height: 30px;
      }
    }
    &.brand {
      padding-top: (@nav-height - 40px) / 2;
      padding-bottom: (@nav-height - 40px) / 2;
      width: @sidebar-width - @sidebar-width-collapse;
      margin-left: 0 !important;
      &:hover {
        background-color: #0087b4;
      }
      img {
        margin-left: auto;
        margin-right: auto;
        height: 40px;
      }
    }
  }
  .navbar-nav {
    & > li {
      & > a {
        color: white;
        &:hover, &:focus {
          color: white;
          background-color: #0087b4;
        }
      }
      &.open > a {
        &, &:hover, &:focus {
          color: #333;
          background-color: white;
        }
      }
    }
  }
}

/*
 * Sidebar
 */
.sidebar {
  display: block;
  width: @sidebar-width;
  position: fixed;
  top: @nav-height;
  bottom: 0;
  left: 0;
  margin-top: 0;
  z-index: 1000;
  background-color: #22282e;
  &.collapse {
    width: @sidebar-width-collapse;
  }
  .nav-sidebar {
    &.nav-line {
      border-top: solid 1px #777777;
    }
  }
  .nav-sidebar > li, .nav-sidebar-sub > li {
    position: relative;
    & > .nav-tooltip {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 140px;
      color: white;
      background-color: rgba(34, 40, 46, 0.8);
      right: -146px;
      padding: 10px 20px;
      text-align: center;
      &:after {
        position: absolute;
        content: "";
        top: 50%;
        left: -6px;
        margin-top: -6px;
        width: 0;
        height: 0;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-right: 6px solid rgba(34, 40, 46, 0.8);
      }
    }
    a {
      padding: 10px 20px;
      color: white;
      white-space: nowrap;
      text-overflow: clip;
      overflow: hidden;
      &:focus {
        color: white;
        background-color: #22282e;
      }
      &:hover, &.hover {
        color: white;
        background-color: #37424f;
      }
    }
    &.active > a {
      &, &:hover, &:focus {
        color: white;
        background-color: #0099cc;
      }
    }
  }

  .nav-sidebar-sub > li > a {
    color: white;
    background-color: #293038;
    span:not([class^='icon-']) {
      padding-left: 1em;
    }
  }
}



